package com.explorati.design_pattern.behavior.visitor.example;

/**
 * 具体元素角色：该角色实现抽象元素中的接受操作
 * 
 * @author explorati
 *
 */
public class CPU extends Hardware {

	public CPU(String type) {
		super(type);
	}

	@Override
	public void run() {
		System.out.println("型号为" + type + "的cpu正在运转");
	}

	@Override
	public void accept(ComputerVisitor computerVisitor) {
		computerVisitor.visitCPU(this);
	}

}
